﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRInertial
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApExportToRTRInertial : ICApExportToRTRWriteable
{
  public double m_mass;
  public CApExportToRTROrigin m_origin;
  public CApExportToRTRInertia m_inertia;

  public CApExportToRTRInertial(
    double mass,
    CApExportToRTROrigin origin,
    CApExportToRTRInertia inertia)
  {
    this.m_mass = mass;
    this.m_origin = origin;
    this.m_inertia = inertia;
  }

  public void Write(CApExportToRTRXmlWriter writer)
  {
    writer.WriteStartElement("inertial");
    this.m_origin.Write(writer);
    writer.WriteStartElement("mass");
    writer.WriteAttributeString("value", this.m_mass.ToString() ?? "");
    writer.WriteEndElement();
    this.m_inertia.Write(writer);
    writer.WriteEndElement();
  }
}
